<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../../avalon.js"></script>
    <script>
        avalon.library("aoyou", {
            $ready: function () {
                avalon.log("控件已经构建完毕")
            }
        });
        require(["./component/checkbox/avalon.checkbox"], function () {
            var vm = avalon.define({
                $id: "test",
                val:[],
                $checkboxconfig1:{
                    id:"11",
                    disabled:false,
                    panel:false,
                    allcheck:true,
                    data:[
                        {name:"苹果",text:"苹果",value:"apple",checked:true},
                        {name:"橘子",text:"橘子",value:"orange"},
                        {name:"葡萄",text:"葡萄",value:"grape"}
                    ],
                    onclick:function ($event,vvmm) {
                        vm.val = vvmm.val;
                    },
                    oninit:function(vvmm){
                        vm.val = vvmm.val;
                    }
                }
            });
            avalon.scan()
        })
    </script>
</head>
<body ms-controller="test">
<aoyou:checkbox config="$checkboxconfig1"></aoyou:checkbox>
<br>
选中状态为:
<span ms-repeat="val"> {{el}}</span>
</body>
</html>